<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>go.js &mdash; testing</title>
        <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />        
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>        
        <script type="text/javascript" src="./../go.js"></script>
        <script type="text/javascript">
            var Tests = ["Class"];
            
            go.Test = (function() {
            
                var calls = [];
                
                var goTest = (function(name, expected, ftest) {
                    if (ftest) {
                        calls.push([test, [name, expected, ftest]]);
                    } else {
                        calls.push([test, [name, expected]]);                    
                    }
                });
                
                goTest.module = (function(name, lifecycle) {
                    calls.push([module, [name, lifecycle]]);
                });
                
                goTest.run = (function() {
                    var len = calls.length;
                    for (var i = 0; i < len; i++) {
                        var func = calls[i][0];
                        var args = calls[i][1];
                        func.apply(null, args);
                    }
                });
            
                return goTest;
            })();
            $(document).ready(function() {
                go.Test.run();
            });
            
            for (var i = 0; i < Tests.length; i++) {
                var src = "./" + Tests[i] + ".js";
                document.write('<script type="text/javascript" src="' + src + '"></' + 'script>');
            }
        </script>
    </head>
    <body>
        <h1 id="qunit-header">Testing <a href="http://code.google.com/p/go-js/">go.js</a></h1>
        <h2 id="qunit-banner"></h2>
        <div id="qunit-testrunner-toolbar"></div>
        <h2 id="qunit-userAgent"></h2>
        <ol id="qunit-tests"></ol>
        <div id="qunit-fixture">test markup, will be hidden</div>    
    </body>
</html>
